class HomeController < ApplicationController
	before_filter :check_if_logged_in, :only => [:dashboard]
		
	def dashboard
		@moviesList = Movie.find_all_appropriate_for_birthdate(current_user.birthdate)
	end
	
	private
	
	def check_if_logged_in
		return true if logged_in?
		flash[:notice] = "Log in to see your dashboard."
		redirect_to login_path
		return false
	end
	
end